import { Component, OnInit, ViewEncapsulation, ViewChild } from '@angular/core';
import { ApiService } from 'src/app/core/api';
import { ActivatedRoute, Router } from '@angular/router';
import { SwiperComponent, RatingConfig, InfiniteLoaderComponent } from 'ngx-weui';

@Component({
	templateUrl: './index.component.html',
	styleUrls: ['./index.component.less'],
	encapsulation: ViewEncapsulation.None,
})
export class MhPicDelComponent implements OnInit {

	del ;
	imgs: Array<any>;

	constructor(
		private activedRoute: ActivatedRoute,
		private api: ApiService,
		private router: Router
	) {
		this.getDel({ id: this.activedRoute.snapshot.queryParams.cartoonChapterId })
	}

	getDel(data) {
		this.del = {
				id: 2,
				chapterName: "寻找七龙珠下2",
				levelStar: 1.2,
				briefInfo: "创建漫画七龙珠2",
				price: 14.00000000,
				isTrade: "N",
				thumbnail: "http://127.0.0.1:8213\\cartoonChapter\\2020-03-10\\13\\2c82febdd7e943b0b948a09afe9289af.jpg",
				images: "../../../../assets/images/picDel-page/timg (2).jfif,../../../../assets/images/picDel-page/20170421134728_SJCPG.thumb.700_0.jpeg",
				viewCount: 1,
				createTime: "2020-03-10 14:56:20"
		}
		this.imgs = this.del['images'].split(',');
		// this.api.post('漫画章节详情', data).then(res => {
		// 	this.del = res['data']['cartoonForUserDetail'];
		// 	this.imgs = this.del['images'].split(',');

		// }).catch(res => {
		// 	return res;
		// });
	}

	ngOnInit() {

	}

	back() { history.back(); }
}
